package com.hl.sfzy.mapper;

import com.hl.sfzy.entity.Course;
import com.hl.sfzy.entity.CourseBuy;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Mystic
* @description 针对表【course_buy(课程购买记录表)】的数据库操作Mapper
* @createDate 2025-03-12 09:13:54
* @Entity com.hl.sfzy.entity.CourseBuy
*/
@Mapper
public interface CourseBuyMapper {

    //根据id删除
    int deleteByPrimaryKey(Long id);
    //新增
    int insert(CourseBuy record);

    //根据id查询
    CourseBuy selectByPrimaryKey(Long id);

    //修改
    int updateByPrimaryKey(CourseBuy courseBuy);
    //批量删除
    int deleteBatch(List<Long> ids);

    //查询所有
    List<CourseBuy> select(int pageNum, int pageSize);
    //分页查询
    List<CourseBuy> selectByPage(@Param("pageNum") int pageNum,
                              @Param("pageSize") int pageSize,
                              @Param("courseBuy") CourseBuy courseBuy);

}
